<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wechat_account_customer', function (Blueprint $table) {
            $table->id();
            $table->string('corp_id')->default('')->comment('企业ID');
            $table->string('account_id')->default('')->comment('成员ID');
            $table->string('customer_id')->default('')->comment('客户ID');
            $table->string('customer_name')->default('')->comment('客户名称');
            $table->string('customer_type')->default('')->comment('客户类型 1表示该外部联系人是微信用户，2表示该外部联系人是企业微信用户');
            $table->integer('add_time')->nullable()->comment('添加时间');
            $table->integer('add_way')->nullable()->comment('添加来源');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wechat_account_customer');
    }
};
